VYFORM0 Set Relations Example Form1% ButtonQuit &Quit ButtonNext &Next Catname Aname Bcode Label7 )matically extracted from the child files. Label6 BAs we skip through the airbuyer file, related data items are auto- Label5 Make and Model from Airtypes.dbf Label3 Category Label4 $Customer name from Child Aircust.dbf Label2 Customer Code Label1 Parent File Airbuyer.dbf MS Sans Serif ButtonNext_Click vxSkip FALSE vxEof vxDeleted CatBox CatNameBox Form8Display Form_Click @ Form_Load AircustDbf| vxUseDbf+ Aircust1Ntx vxUseNtx: AirtypesDbfI AirtypesNtx AirbuyerDbf Airbuy1Ntx vxTop* vxSetAlias vxSetRelation ErrCode VYFORM0 VYForm0Display VYForom0Display> vxRecord Category Catname vxEvalLogical EvalBox EvStr vxEvalStringn JoinBox BcodeQ vxField Aname ButtonQuit_Click Form_Paint vxSelectDbf vxFormFrame VXFORM8 vxCtlStyle VX_RECESS Form_Unload Cancel vxCloseAll vxWindowDereg ButtonNext_Click skip forward one record if skip error, only allow exit- Error on Skip Next. Try Reindex. test for end of file End of File! ButtonQuit_Click Form_Load vxSetRelations Examplem We will skip through the Airbuyer filef which has a many to one relationship with both the aircust.dbf file and the airtypes.dbf. file. open child files firsti \vb\vxbtest\aircust.dbf \vb\vxbtest\aircust1.ntx put something in record buffer \vb\vxbtest\airtypes.dbf \vb\vxbtest\airtypes.ntx open parent file (has many records) \vb\vxbtest\airbuyer.dbf \vb\vxbtest\airbuy1.ntx define alias names so we can use fieldi qualifiers when extracting data buyer customer define relationship to current selectionb the 1st param defines the file we setting up the relationship to (the child file) and the second param tells vxbase how tow construct a key to be used on the current index in use on the child filef b_code 1st relation failed b_cat 2nd relation failed now when we issue vxTop(), the two relateds file pointers will move to match the values in the parent file key fields Form_Paint Form_Unload VYForm0Display buyer.b_code buyer.b_cat customer.a_name type.catname